package com.example.movie_shop.Util;

//查询电影信息的条件
public class QueryCondition {
    private Integer pageNew;
    private Integer pageSize;
    private String genres;  //电影类型
    private Double price1;
    private Double price2;
    private String orderBy;
    private int descOrAsc;

    public Integer getPageNew() {
        return pageNew;
    }

    public void setPageNew(Integer pageNew) {
        this.pageNew = pageNew;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getGenres() {
        return genres;
    }

    public void setGenres(String genres) {
        this.genres = genres;
    }

    public Double getPrice1() {
        return price1;
    }

    public void setPrice1(Double price1) {
        this.price1 = price1;
    }

    public Double getPrice2() {
        return price2;
    }

    public void setPrice2(Double price2) {
        this.price2 = price2;
    }

    public int getDescOrAsc() {
        return descOrAsc;
    }

    public void setDescOrAsc(int descOrAsc) {
        this.descOrAsc = descOrAsc;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    @Override
    public String toString() {
        return "select * from t_movie where genres = "+genres+
                " and price between "+price1+","+price2+
                " limit "+pageNew+","+pageSize+
                " order by "+orderBy+" "+ descOrAsc;
    }

}
